#pragma once

#include <QWidget>
#include <QLabel>
#include <QProgressBar>

#include <QHBoxLayout>
#include <QVBoxLayout>

#include "header.h"

class SendFileWidget : public QWidget
{
    Q_OBJECT
public:
    explicit SendFileWidget(const QString &str1, const QString &str2, qint64 total, QWidget *parent = nullptr);

    void setMsg(const QString &str);
    void setProgressBarVisible(bool visible);
    qint64 progress() { return mProgress; }
    qint64 total() { return mValTotal; }

public slots:
    void setProgress(qint64 value);

private:
    QProgressBar *mProgressBar;
    QLabel *mLabelMsg, *mLabelBytes;
    qint64 mProgress, mValTotal;
    QString mStrTotal;
};

